<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page isELIgnored="false" %> 

<%@ page import="net.ssta.core.db.RecordSet"%>
<%@ page import="net.ssta.core.db.Record"%>
<%@ page import="net.ssta.core.db.PagingInfo"%>

<%
	String path = request.getContextPath();
	//分页参数
    PagingInfo pagingInfo =(PagingInfo) request.getAttribute("pagingInfo");
    
	RecordSet rs=(RecordSet)request.getAttribute("RECORDSET");
	if(rs==null){rs=new RecordSet();}
	
	 int pageno = pagingInfo.getCurrentPageNo();
	 Record  searRecord=(Record)request.getAttribute("searchData");
	 if(searRecord==null){
		 searRecord=new Record();
	 }
%>




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>


<link type="text/css" rel="stylesheet" href="<%=path %>/includes/css/commonStyle.css"/> 
<link type="text/css" rel="stylesheet" href="<%=path %>/includes/styleBase/css/styleBase.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/includes/styleBase/css/ostable.css" />
<link rel="stylesheet" href="<%=path %>/includes/lhgdialog/lhgdialog.css" />


<script type='text/javascript' src="<%=path %>/includes/js/jquery.js"></script>
<script type="text/javascript" src="<%=path %>/includes/styleBase/js/style.js"></script>
<script type="text/javascript" src="<%=path %>/includes/DatePicker/WdatePicker.js"></script>


<script type="text/javascript" src="<%=path %>/includes/lhgdialog/lhgcore.min.js"></script>
<script type="text/javascript" src="<%=path %>/includes/lhgdialog/lhgdialog.js"></script>



<title>注册用户管理</title>
 
<script type="text/javascript">
 
	function recharge()
	{
	
		var v=$("input:[name=userId]:checked").val();
		if(v==null){
		  alert("您必须选择一个用户");
		  return;
		}
	
	    
		var dlg = new J.ui.dialog(
		{ id:'handledemand',
	         title:'充值',
	         range:true,
	         btns:true,
	         page:'<%=path%>/back/registerUser/recharge.jsp?userId='+v,
	         width:400,
	         height:320,
	         windowObj:window
	       });
		dlg.ShowDialog();
	}
	
	function chargeBack()
	{
		 var bill=$("input:[name=userId]:checked").attr("bill");
	    if(bill=="0"||bill==""||bill==null){
	       alert("账户金额为0的不允许再进行扣费了!");
	       return;
	    }
	    
		var v=$("input:[name=userId]:checked").val();
		if(v==null){
		  alert("您必须选择一个用户");
		  return;
		}
		var dlg = new J.ui.dialog(
		{ id:'handledemand',
	         title:'扣费',
	         range:true,
	         btns:true,
	         page:'<%=path%>/back/registerUser/chargeBack.jsp?bill='+bill+'&userId='+v,
	         width:400,
	         height:320,
	         windowObj:window
	       });
		dlg.ShowDialog();
	}
	
	
	function vipconfig()
	{
	
	    var bill=$("input:[name=userId]:checked").attr("bill");
	    if(bill=="0"||bill==""||bill==null){
	       alert("账户金额为0的不允许进行统包设置!");
	       return;
	    }
		var v=$("input:[name=userId]:checked").val();
		if(v==null){
		  alert("您必须选择一个用户");
		  return;
		}
		var dlg = new J.ui.dialog(
		{ id:'handledemand',
	         title:'统包设置',
	         range:true,
	         btns:true,
	         page:'<%=path%>/back/registerUser/vipconfig.jsp?userId='+v,
	         width:400,
	         height:250,
	         windowObj:window
	       });
	        dlg.opt.regDragWindow.push( window );
			dlg.ShowDialog();
	}
	
	
	
	//跳转
	function reloadPage() 
	{
		_goPage(<%=pageno%>);
	}
</script>

</head>
<body>
 
	<div class="titleDiv">
  <table width="100%" cellpadding="0" cellspacing="0" border="0" style="text-align:left;">
    <tr>
      <td class="box_top_left">&nbsp;</td>
      <td class="box_top_center">用户信息查询</td>
      <td class="box_top_right">&nbsp;</td>
    </tr>
  </table>
</div>

<form name="_sForm" action="<%=path %>/back/userPointManager" method="post">
	<div class="infoDiv">
	  <table border="0" cellpadding="0" cellspacing="0" class="trHeightTable" >
	    <tr>
	      <td class="leftTipArea">用户名：</td>
	      <td><input  name="search_LOGINNAME" class="textInput" style="width:120px;" value="<%=searRecord.getString("LOGINNAME","") %>"/></td>
	    
	   
		   <td class="leftTipArea">真实姓名：</td>
	      <td><input  name="search_USERNAME" class="textInput" style="width:120px;" value="<%=searRecord.getString("USERNAME","") %>"/></td>
	    
	    
	    
	      
		   <td class="leftTipArea">单位名称：</td>
	      <td><input  name="search_WORKORG" class="textInput" style="width:120px;" value="<%=searRecord.getString("WORKORG","") %>"/></td>
	    </tr>
	    
	     <tr>
	      <td class="leftTipArea">金额范围：</td>
	      <td>
	          <select name="search_BILLRANGE" style="width:124px;">
	            <option value="">全部</option>
	            <option value="0" <%="0".equals(searRecord.getString("BILLRANGE"))?"selected":"" %>>0</option>
	            <option value="1" <%="1".equals(searRecord.getString("BILLRANGE"))?"selected":"" %>>1—100</option>
	            <option value="2" <%="2".equals(searRecord.getString("BILLRANGE"))?"selected":"" %>>101—1000</option>
	            <option value="3" <%="3".equals(searRecord.getString("BILLRANGE"))?"selected":"" %>>1000以上</option>
	          </select>
	      
	      </td>
	    
	    
	     <td class="leftTipArea">统包范围：</td>
	      <td>
	          <select name="search_VIPRANGE" style="width:124px;">
	            <option value="">全部</option>
	            <option value="0" <%="0".equals(searRecord.getString("VIPRANGE"))?"selected":"" %>>早于当前</option>
	            <option value="1" <%="1".equals(searRecord.getString("VIPRANGE"))?"selected":"" %>>一周内</option>
	            <option value="2" <%="2".equals(searRecord.getString("VIPRANGE"))?"selected":"" %>>一月内</option>
	            <option value="3" <%="3".equals(searRecord.getString("VIPRANGE"))?"selected":"" %>>半年内</option>
	            <option value="4" <%="4".equals(searRecord.getString("VIPRANGE"))?"selected":"" %>>一年内</option>
	          </select>
	      
	      </td>
	    
	    
	     
	      <td colspan="2" >
	      	<a href="javascript:document._sForm.submit()" class="imgButton"  style="margin-left:40px"><span>查询</span></a>
	      </td>
	    </tr>
	  </table>
	</div>
</form>

<div class="titleDiv">
  <table width="100%" cellpadding="0" cellspacing="0" border="0" style="text-align:left;">
    <tr>
      <td class="box_top_left" width="2">&nbsp;</td>
      <td class="box_top_center">查询结果列表</td>
      <td class="box_top_right" width="2">&nbsp;</td>
    </tr>
  </table>
</div>

<div class="contentBox">
    <table class="osTable" cellpadding="0" cellspacing="0" border="0">
      <thead>
        <tr >
          <th  width="5%" >选择</th>
          <th  width="8%" >用户名</th>
          <th  width="8%" >真实姓名</th>
          <th  width="12%" >电话</th>
          <th  width="12%" >Email</th>
          <th  width="12%" >工作单位</th>
          <th  width="15%">用户余额</th>
          <th  width="15%">统包开始时间</th>
          <th  width="15%">统包结束时间</th>
        </tr>
      </thead>
      <tbody>
        <%
           int i=0;
           for(i=0;i<rs.size();i++){
        	   Record r=rs.get(i);
        %>
	 
	 <tr>
	    <td><input type="radio" value="<%=r.getString("USERID","") %>" name="userId" bill="<%=r.getString("USERPOINT","0") %>"/>&nbsp;</td>
	    <td><%=r.getString("LOGINNAME","") %>&nbsp;</td>
	    <td><%=r.getString("FULLNAME","") %>&nbsp;</td>
	    <td><%=r.getString("TELEPHONE","") %>&nbsp;</td>
        <td><%=r.getString("EMAIL","") %>&nbsp;</td>
        <td><%=r.getString("WORKORG","") %>&nbsp;</td>
            
	    <td><%=r.getString("USERPOINT","0") %>&nbsp;</td>
	    <td><%=r.getString("STARTDATE","") %>&nbsp;</td>
	    <td><%=r.getString("ENDDATE","") %>&nbsp;</td>
	 </tr>
	 <%} for(;i<10;i++){%>
	<tr>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	 </tr>
	 <%} %>
      </tbody>
    </table>
	<div class="navDiv">
    <div class="navLeftDiv">
        <a href="#2010" class="imgButton"  onclick="recharge()"><span>充值</span></a>
        <a href="#2010" class="imgButton"  onclick="chargeBack()"><span>扣费</span></a>
        <a href="#2010" class="imgButton"  onclick="vipconfig()"><span>统包管理</span></a>
    </div>
    
    <div class="navRightDiv">  
    	 <jsp:include flush="true" page="/common/paging.jsp"></jsp:include>
	</div>
</div>
</div>
</body> 
</html>